package com.ibeeking.found.common.enums.logistics;

public enum ExpressTemplateTypeEnum {

    FEE_BY_BUYER("买家承担费用", 0),
    FEE_BY_SELLER("卖家包邮", 1),;
    private String desc;
    private Integer code;

    ExpressTemplateTypeEnum(String desc, int code) {
        this.code = code;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getCode() {
        return code;
    }

    public static String getDescByCode(Integer code) {
        for (ExpressTemplateTypeEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getDesc();
            }
        }
        return null;
    }
}
